﻿#pragma once

#include <QThread>
#include "rdkafkacpp.h"


class kafka : public QThread
{
	Q_OBJECT

public:
	explicit kafka(std::string,QString strId, QObject* parent = nullptr);
	~kafka();

public:
	void msg_consume(RdKafka::Message* message, void* opaque);

	void stop();


private:
	//重写线程执行函数
	void run();
	std::string				m_kafkaIp;
	QString					m_strId;

signals:
	void valueUpdate(QString name, QString data);


};

